package com.wu.shop.util

import com.wu.shop.observable.ShopCarBuyObservable
import com.wu.shop.observable.shopcar.ShopCarBuyInfo

object ShopCarUtil {
    /**
     * 处理购物车加减的观察者
     */
    fun processAddOrSub(goodsId:String,goodsPrice:String,isAdd:Boolean,goodsNum:Int){
        var info = ShopCarBuyInfo( goodsId, goodsPrice,isAdd,goodsNum)
        ShopCarBuyObservable.processGoods(info)
    }
    /**
     * 处理购物车加减的观察者
     */
    fun processAddOrSub(goodsId:String, goodsPrice:String, isAdd:Boolean, goodsNum:Int, shopId:String){
        var info = ShopCarBuyInfo( goodsId, goodsPrice,isAdd,goodsNum,shopId)
        ShopCarBuyObservable.processGoods(info)
    }
}